#include "formmode.h"
#include "ui_formmode.h"
//#include "timenow.h"
#include"checkin.h"
#include<QDebug>
#include<QDateTime>
#include"teacher.h"

FormMode::FormMode(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::FormMode)
{
    ui->setupUi(this);
}

FormMode::~FormMode()
{
    delete ui;
}
void FormMode::showformmode()
{
    emit signalformmode();
    this->show();
}

void FormMode::on_pb_time_clicked()
{
    QDateTime time = QDateTime::currentDateTime();
     m_str = time.toString("yyyyMMddhh");
    ui->label_time->setText(m_str);
}

void FormMode::slottclass()
{
    formtclassW->show();
    formtclassW->str = str;
}

void FormMode::on_pb_ok_clicked()
{
    formtclassW = new Formtclass;
    connect(formtclassW,&Formtclass::signalformtclass,this,&FormMode::slottclass);
    this->hide();
    formtclassW->Windowshow(ui->lineEdit_teacher_classid->text(),ui->label_time->text(),str);
}
